/* 基础样式重置和现代化设计变量 */
:root {
  /* 颜色变量 - 优化配色方案 */
  --primary-blue: #2563eb;
  --primary-blue-light: #3b82f6;
  --primary-blue-dark: #1d4ed8;
  --primary-indigo: #6366f1;
  --primary-indigo-light: #818cf8;
  --primary-indigo-dark: #4f46e5;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --bg-gray: #f3f4f6;
  --bg-gray-light: #fafbfc;
  --border-color: #e5e7eb;
  --border-color-light: #f3f4f6;
  
  /* 阴影变量 - 增强层次感 */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-blue: 0 4px 14px 0 rgb(37 99 235 / 0.15);
  --shadow-blue-lg: 0 10px 25px -3px rgb(37 99 235 / 0.2);
  
  /* 动画时长 */
  --transition-fast: 0.2s;
  --transition-normal: 0.3s;
  --transition-slow: 0.5s;
  
  /* 圆角 */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* 字体渲染优化 */
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 基础重置 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 确保app容器样式正确 */
#app {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #f0f4f8 0%, #e8f0f8 50%, #f5f9fc 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  position: relative;
}

#app::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 50% 20%, rgba(59, 130, 246, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* 全局卡片样式 - 增强视觉效果 */
.card-shadow {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
}

.card-shadow::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-blue), var(--primary-indigo));
  opacity: 0;
  transition: opacity var(--transition-normal) ease;
}

.card-shadow:hover::before {
  opacity: 1;
}

.card-shadow:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(37, 99, 235, 0.1);
  transform: translateY(-4px);
  border-color: var(--primary-blue-light);
}

/* 玻璃态卡片效果 */
.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* 渐变背景类 - 增强视觉效果 */
.bg-gradient-blue {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-indigo) 100%);
}

.bg-gradient-blue-light {
  background: linear-gradient(135deg, var(--primary-blue-light) 0%, var(--primary-indigo-light) 100%);
}

.bg-gradient-mesh {
  background: 
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(99, 102, 241, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(37, 99, 235, 0.1) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(99, 102, 241, 0.1) 0px, transparent 50%);
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 滚动条美化 - 现代化设计 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-gray-light);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-indigo) 100%);
  border-radius: 10px;
  border: 2px solid var(--bg-gray-light);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--primary-blue-light) 0%, var(--primary-indigo-light) 100%);
}

/* 隐藏滚动条但保留功能 */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* 响应式图片 */
img {
  max-width: 100%;
  height: auto;
}

/* 文本链接样式 - 增强交互 */
a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: all var(--transition-fast) ease;
  position: relative;
}

a:hover {
  color: var(--primary-blue-dark);
}

/* 下划线动画链接 */
a.link-underline {
  position: relative;
}

a.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-blue);
  transition: width var(--transition-normal) ease;
}

a.link-underline:hover::after {
  width: 100%;
}

/* 按钮基础样式 - 现代化设计 */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-indigo) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.9375rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-blue);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-blue-light) 0%, var(--primary-indigo-light) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue-lg);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-blue);
}

/* 次要按钮 */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  background: var(--bg-white);
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.9375rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal) ease;
}

.btn-secondary:hover {
  background: var(--primary-blue);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 动画定义 - 增强视觉效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    transform: translate3d(0, 0, 0);
  }
  40%, 43% {
    animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
    transform: translate3d(0, -8px, 0);
  }
  70% {
    animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
    transform: translate3d(0, -4px, 0);
  }
  90% {
    transform: translate3d(0, -2px, 0);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-fadeUp {
  animation: fadeUp 0.8s ease-out forwards;
}

.animate-slideInLeft {
  animation: slideInLeft 0.6s ease-out forwards;
}

.animate-slideInRight {
  animation: slideInRight 0.6s ease-out forwards;
}

.animate-scaleIn {
  animation: scaleIn 0.5s ease-out forwards;
}

.animate-bounce {
  animation: bounce 2s infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 2s infinite;
}

/* 装饰图案 */
.pattern-dots {
  background-image: radial-gradient(var(--primary-blue) 1px, transparent 1px);
  background-size: 30px 30px;
}

.pattern-grid {
  background-image: 
    linear-gradient(var(--border-color-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-color-light) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* 通用工具类 */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-indigo) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-shadow-sm {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 分隔线增强 */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
  margin: 2rem 0;
}

.divider-vertical {
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--border-color), transparent);
}
